<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<SubSystem.Models.ArticleModel>" %>
<%@ Import Namespace="SubSystem.Helpers"%>

<%@ Import Namespace="MvcContrib.UI.Html" %>
<asp:Content ID="editTitle" ContentPlaceHolderID="TitleContent" runat="server">
    Edit Article
</asp:Content>
<asp:Content ID="editJs" ContentPlaceHolderID="JsContent" runat="server">

    <script src="/Scripts/smarkup/smarkup.js" type="text/javascript" language="javascript" />

    <%=Html.ScriptInclude("~/Scripts/smarkup/conf/html/conf.js")%>
</asp:Content>
<asp:Content ID="editContent" ContentPlaceHolderID="MainContent" runat="server">
    <%=Html.ScriptInclude("~/Scripts/smarkup/conf/html/conf.js")%>
    <%= Html.ValidationSummary("Edit was unsuccessful. Please correct the errors and try again.") %>
    <div>
        <% using (Html.BeginForm())
           {%>
        <%=Html.Hidden("Article.Id", Model.Article.Id, new { id = "Article.Id", enabled = "false" }) %>
        <%=Html.TextArea("Article.Content", Model.Article.Content, new { @class = "html", id = "Article.Content" })%>
        <%=Html.TagSelector(Model.Article.Tags) %>
        <input type="submit" value="Save" />
        <% } %>
    </div>
    <div>
        <%=Html.ActionLink("Back to List", "Index") %>
    </div>

    <script type="text/javascript" language="javascript">
        SMarkUp.bind('Article.Content', 'html', 300);
    </script>

</asp:Content>
